home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20041116-20060924
/
000045_m.g.walker@NOmassey.SPac.AMnz_Fri Feb 4 12:19:21 2005.msg
< prev
next >
Wrap
Internet Message Format
|
2006-09-27
|
2KB
Path: newsmaster.cc.columbia.edu!panix!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail
From: Matthew Walker <m.g.walker@NOmassey.SPac.AMnz>
Newsgroups: comp.protocols.kermit.misc
Subject: Terminating a telnet session
Date: Fri, 04 Feb 2005 16:21:03 +1300
Organization: Ihug Limited
Lines: 56
Message-ID: <ctupi6$uru$1@lust.ihug.co.nz>
NNTP-Posting-Host: 203-173-172-66.bliink.ihug.co.nz
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: lust.ihug.co.nz 1107487110 31614 203.173.172.66 (4 Feb 2005 03:18:30 GMT)
X-Complaints-To: abuse@ihug.co.nz
NNTP-Posting-Date: Fri, 4 Feb 2005 03:18:30 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15280
Hi,
I'm trying to nicely/cleanly terminate a telnet session, but I'm unsure
how to do this with c-kermit 8.0.209.
I'm polling a telnet server every five minutes, and have discovered
that after a few hours the server doesn't take any more connections. I
suspect that's because I was just closing each connection, rather than
using the server's "logoff" command.
I've added a logoff command to my script. My first problem is that
even if I wait for the "Logging off." text from the server, kermit
still closes the connection before the server closes its end.
In an attempt to fix that problem, I added a "bye" command at the very
end of the script. However, now the "bye" command fails (I assume)
because the connection has closed by the time the "bye" is executed.
Is there some way to ask kermit to wait until the connection is closed?
Thanks for your thoughts,
Matthew
Script copied below:
#!/usr/bin/kermit +
set host 192.168.1.1
set input echo on
input 10 Login:
if failure exit 1 No login prompt
output [username]\13
input 10 Password:
if failure exit 1 No password prompt
output [password]\13
input 10 -->
if failure exit 1 No command line prompt
output ip list interfaces\13
input 10 -->
if failure exit 1 No command prompt after listing interfaces
output user logout\13
input 10 Logging out.
if failure exit 1 Failure to correctly close connection (didn't receive
text)
bye
if failure exit 1 Failure to correctly close connection ('bye' errored)
if success exit 0 Success